package com.ulife.order.components.core.result;

/**
 * Created by Lbq on 2016/06/12.
 */
public enum ResultCode {
    Failure(0),
    Success(1),
    Repeat(2);
    private int value = 1;

    private ResultCode(int value) {
        this.value = value;
    }

    public static ResultCode valueOf(int value){
        switch (value){
            case 0:return Failure;
            case 1:return Success;
            case 2:return Repeat;
            default:return null;
        }
    }
    public int value(){
        return this.value;
    }
}
